Refactor workspace libraries handling #400
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Update version of workspace library database to v2
WorkspaceLibraryDb: Add more methods to query data
Add support for reading more data from the database, especially library metadata.
Refactor and improve scanning of workspace libraries
WorkspaceLibraryScanner now also scans which libraries are installed instead of using the libraries loaded by the Workspace object. This allows to add/remove/update workspace libraries without notifying the Workspace object about the exact changes. To get faster feedback of the changes (e.g. to update the widgets of the library manager), the scanner now emits a signal after the library list is updated.
In addition, the scanner now emits a new signal scanFinished() which is used in many classes to get notified even if the scan fails or was aborted.
Also the debug output is now a bit more verbose to see more information about the library scan.
Restart workspace library scanner when triggered
Until now, the workspace library scanner was not restarted on every trigger, thus triggers while the scan was running were lost, which lead to outdated information in the database. Now the scan is immediately restarted if it is triggered while already running. This avoids outdated information, and is important to keep the list of libraries (especially in the library manager) always up to date when libraries are added or removed.
LibraryManager: Use library metadata from database
Because now we have more library metadata in the database.
Workspace: Don't load libraries at startup
Using libraries from the database instead -> Faster startup, and avoids message boxes if libraries can't be loaded.